﻿using System;
using System.Collections.Generic;

using SiteUnity.Layers.Application.BaseClasses;
using SiteUnity.Layers.Application;
using SiteUnity.Layers.Entity.General;
using SiteUnity.Layers.Core.Provider;
using SiteUnity.Frame.Modules.Gallery.Slider;

public partial class _Default : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        GeneralProvider provider = new GeneralProvider();
        List<Website> websites = provider.selectWebsites();
        List<PageItem> galleryItems = new List<PageItem>();

        foreach (Website website in websites)
        {
            PageItem newItem = new PageItem();
            newItem.Title = website.Name;
            newItem.Url = website.Url;
            newItem.ImageUrl = website.ImageUrl;

            galleryItems.Add(newItem);
        }

        PageGallery1.Pages = galleryItems;
    }
}